package com.huangkailong.designpattern.proxy.staticproxy;

import com.huangkailong.designpattern.proxy.common.DatasourceSupport;
import com.huangkailong.designpattern.proxy.common.OrderDao;
import com.huangkailong.designpattern.proxy.common.OrderService;
import com.huangkailong.designpattern.proxy.common.OrderServiceImpl;
import com.huangkailong.designpattern.proxy.common.OrderServiceTest;

/**
 * 静态代理测试类.
 *
 * @author huangkl
 * @since 1.0.0
 */
public class Client {

    /**
     * main 方式.
     *
     */
    public static void main(String[] args) {
        OrderServiceImpl orderServiceImpl = new OrderServiceImpl(new OrderDao());
        DatasourceSupport datasourceSupport = new DatasourceSupport();
        OrderService orderService = new OrderServiceProxy(orderServiceImpl, datasourceSupport);
        OrderServiceTest.testProxy(orderService);
    }
}
